<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<!DOCTYPE html>

<html>
    <head>
        <meta charset="UTF-8">
        <title>首页</title>
    </head>
    <body>

        <h1>ServletContext</h1>

        <ul>
            <li> <a href="${pageContext.servletContext.contextPath}/application/counter">计数器</a> </li>
            <li> <a href="<%= application.getContextPath() %>/app/counter">计数器</a> </li>
            <li> <a href="${pageContext.servletContext.contextPath}/application/name">应用名称和应用路径</a> </li>
            <li> <a href="<%= application.getContextPath() %>/app/name">应用名称和应用路径</a> </li>
        </ul>

        <ul>
            <li>
                <a href="${pageContext.request.contextPath}/dispatcher/name">根据名称调度请求</a>
            </li>
            <li>
                <a href="${pageContext.request.contextPath}/dispatcher/path">根据路径调度请求</a>
            </li>
        </ul>

    </body>
</html>